summaryrefslogtreecommitdiffstats
path: root/content/browser/accessibility/dump_accessibility_tree_browsertest.cc
diff options
context:
space:
mode:
Diffstat (limited to 'content/browser/accessibility/dump_accessibility_tree_browsertest.cc')
-rw-r--r--content/browser/accessibility/dump_accessibility_tree_browsertest.cc24
1 files changed, 12 insertions, 12 deletions
diff --git a/content/browser/accessibility/dump_accessibility_tree_browsertest.cc b/content/browser/accessibility/dump_accessibility_tree_browsertest.cc
index b1c7d98..9b47dfb 100644
--- a/content/browser/accessibility/dump_accessibility_tree_browsertest.cc
+++ b/content/browser/accessibility/dump_accessibility_tree_browsertest.cc
@@ -18,6 +18,8 @@
#include "content/browser/accessibility/dump_accessibility_tree_helper.h"
#include "content/browser/renderer_host/render_view_host_impl.h"
#include "content/port/browser/render_widget_host_view_port.h"
+#include "content/public/browser/notification_service.h"
+#include "content/public/browser/notification_types.h"
#include "content/public/browser/web_contents.h"
#include "content/public/common/content_paths.h"
#include "content/public/test/test_utils.h"
@@ -26,16 +28,14 @@
#include "content/shell/shell.h"
#include "testing/gtest/include/gtest/gtest.h"
-namespace content {
-
namespace {
+ static const char kCommentToken = '#';
+ static const char* kMarkSkipFile = "#<skip";
+ static const char* kMarkEndOfFile = "<-- End-of-file -->";
+ static const char* kSignalDiff = "*";
+} // namespace
-const char kCommentToken = '#';
-const char kMarkSkipFile[] = "#<skip";
-const char kMarkEndOfFile[] = "<-- End-of-file -->";
-const char kSignalDiff[] = "*";
-
-} // namespace
+namespace content {
typedef DumpAccessibilityTreeHelper::Filter Filter;
@@ -166,17 +166,17 @@ void DumpAccessibilityTreeTest::RunTest(
}
// Load the page.
+ WindowedNotificationObserver tree_updated_observer(
+ NOTIFICATION_ACCESSIBILITY_LOAD_COMPLETE,
+ NotificationService::AllSources());
string16 html_contents16;
html_contents16 = UTF8ToUTF16(html_contents);
GURL url = GetTestUrl("accessibility",
html_file.BaseName().MaybeAsASCII().c_str());
- scoped_refptr<MessageLoopRunner> loop_runner(new MessageLoopRunner);
- view_host->SetAccessibilityLoadCompleteCallbackForTesting(
- loop_runner->QuitClosure());
NavigateToURL(shell(), url);
// Wait for the tree.
- loop_runner->Run();
+ tree_updated_observer.Wait();
// Perform a diff (or write the initial baseline).
string16 actual_contents_utf16;