Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(105)

Side by Side Diff: chrome/test/ui_test_utils.cc

Issue 328029: DevTools: fix and enable DevToolsExtensionDebugTest.TestContentScriptIsPresen... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « chrome/test/data/devtools/page_with_content_script.html ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2009 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/test/ui_test_utils.h" 5 #include "chrome/test/ui_test_utils.h"
6 6
7 #include <vector> 7 #include <vector>
8 8
9 #include "base/json/json_reader.h" 9 #include "base/json/json_reader.h"
10 #include "base/message_loop.h" 10 #include "base/message_loop.h"
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
76 int number_of_navigations_; 76 int number_of_navigations_;
77 77
78 DISALLOW_COPY_AND_ASSIGN(NavigationNotificationObserver); 78 DISALLOW_COPY_AND_ASSIGN(NavigationNotificationObserver);
79 }; 79 };
80 80
81 class DOMOperationObserver : public NotificationObserver { 81 class DOMOperationObserver : public NotificationObserver {
82 public: 82 public:
83 explicit DOMOperationObserver(RenderViewHost* render_view_host) { 83 explicit DOMOperationObserver(RenderViewHost* render_view_host) {
84 registrar_.Add(this, NotificationType::DOM_OPERATION_RESPONSE, 84 registrar_.Add(this, NotificationType::DOM_OPERATION_RESPONSE,
85 Source<RenderViewHost>(render_view_host)); 85 Source<RenderViewHost>(render_view_host));
86 RunMessageLoop(); 86 ui_test_utils::RunMessageLoop();
87 } 87 }
88 88
89 virtual void Observe(NotificationType type, 89 virtual void Observe(NotificationType type,
90 const NotificationSource& source, 90 const NotificationSource& source,
91 const NotificationDetails& details) { 91 const NotificationDetails& details) {
92 DCHECK(type == NotificationType::DOM_OPERATION_RESPONSE); 92 DCHECK(type == NotificationType::DOM_OPERATION_RESPONSE);
93 Details<DomOperationNotificationDetails> dom_op_details(details); 93 Details<DomOperationNotificationDetails> dom_op_details(details);
94 response_ = dom_op_details->json(); 94 response_ = dom_op_details->json();
95 MessageLoopForUI::current()->Quit(); 95 MessageLoopForUI::current()->Quit();
96 } 96 }
(...skipping 400 matching lines...) Expand 10 before | Expand all | Expand 10 after
497 NotificationObserver* observer, 497 NotificationObserver* observer,
498 int64 timeout_ms) { 498 int64 timeout_ms) {
499 NotificationRegistrar registrar; 499 NotificationRegistrar registrar;
500 registrar.Add(observer, type, NotificationService::AllSources()); 500 registrar.Add(observer, type, NotificationService::AllSources());
501 MessageLoop::current()->PostDelayedTask( 501 MessageLoop::current()->PostDelayedTask(
502 FROM_HERE, new MessageLoop::QuitTask, timeout_ms); 502 FROM_HERE, new MessageLoop::QuitTask, timeout_ms);
503 RunMessageLoop(); 503 RunMessageLoop();
504 } 504 }
505 505
506 } // namespace ui_test_utils 506 } // namespace ui_test_utils
OLDNEW
« no previous file with comments | « chrome/test/data/devtools/page_with_content_script.html ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698