summaryrefslogtreecommitdiffstats
path: root/chrome/browser/extensions/extension_apitest.cc
diff options
context:
space:
mode:
authorphajdan.jr@chromium.org <phajdan.jr@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-04-08 06:41:43 +0000
committerphajdan.jr@chromium.org <phajdan.jr@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-04-08 06:41:43 +0000
commit93b86a850b7b1b3f46a7c4fc4521fefa8ca56e8d (patch)
tree379ae4e770b1a30e925852ee51e58250a4c7d3fd /chrome/browser/extensions/extension_apitest.cc
parentf039cd1a367ad89d07a2344b6a8e3f39cd5b0758 (diff)
downloadchromium_src-93b86a850b7b1b3f46a7c4fc4521fefa8ca56e8d.zip
chromium_src-93b86a850b7b1b3f46a7c4fc4521fefa8ca56e8d.tar.gz
chromium_src-93b86a850b7b1b3f46a7c4fc4521fefa8ca56e8d.tar.bz2
[GTTF] Clean up browser tests:
- use more ui_test_utils functions to simplify the code - expose more consistent and powerful utilities in ui_test_utils - minor style improvements - move some tests from DISABLED to FLAKY so we don't lose coverage - remove redundant timeouts - check more return values TEST=browser_tests BUG=none Review URL: http://codereview.chromium.org/1571002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@43931 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/extensions/extension_apitest.cc')
-rw-r--r--chrome/browser/extensions/extension_apitest.cc15
1 files changed, 5 insertions, 10 deletions
diff --git a/chrome/browser/extensions/extension_apitest.cc b/chrome/browser/extensions/extension_apitest.cc
index 081a092..cc16957 100644
--- a/chrome/browser/extensions/extension_apitest.cc
+++ b/chrome/browser/extensions/extension_apitest.cc
@@ -10,10 +10,6 @@
#include "chrome/common/notification_registrar.h"
#include "chrome/test/ui_test_utils.h"
-namespace {
-static const int kTimeoutMs = 60 * 1000; // 1 minute
-};
-
ExtensionApiTest::ResultCatcher::ResultCatcher() {
registrar_.Add(this, NotificationType::EXTENSION_TEST_PASSED,
NotificationService::AllSources());
@@ -26,19 +22,18 @@ bool ExtensionApiTest::ResultCatcher::GetNextResult() {
// to RunMessageLoop(), so we maintain a queue of results and just pull them
// off as the test calls this, going to the run loop only when the queue is
// empty.
- if (!results_.size()) {
- MessageLoop::current()->PostDelayedTask(
- FROM_HERE, new MessageLoop::QuitTask, kTimeoutMs);
+ if (results_.empty())
ui_test_utils::RunMessageLoop();
- }
- if (results_.size()) {
+
+ if (!results_.empty()) {
bool ret = results_.front();
results_.pop_front();
message_ = messages_.front();
messages_.pop_front();
return ret;
}
- message_ = "No response from message loop.";
+
+ NOTREACHED();
return false;
}