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

Side by Side Diff: chrome/test/ppapi/ppapi_test.cc

Issue 10822030: Move ui_test_utils::RunMessageLoop to test_utils so that it can be reused by content_browsertests. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 8 years, 5 months 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
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/ppapi/ppapi_test.h" 5 #include "chrome/test/ppapi/ppapi_test.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/file_util.h" 8 #include "base/file_util.h"
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "base/path_service.h" 10 #include "base/path_service.h"
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
66 waiting_(false), 66 waiting_(false),
67 timeout_(timeout) { 67 timeout_(timeout) {
68 registrar_.Add(this, content::NOTIFICATION_DOM_OPERATION_RESPONSE, 68 registrar_.Add(this, content::NOTIFICATION_DOM_OPERATION_RESPONSE,
69 content::Source<RenderViewHost>(render_view_host)); 69 content::Source<RenderViewHost>(render_view_host));
70 timer_.Start(FROM_HERE, timeout, this, &TestFinishObserver::OnTimeout); 70 timer_.Start(FROM_HERE, timeout, this, &TestFinishObserver::OnTimeout);
71 } 71 }
72 72
73 bool PPAPITestBase::TestFinishObserver::WaitForFinish() { 73 bool PPAPITestBase::TestFinishObserver::WaitForFinish() {
74 if (!finished_) { 74 if (!finished_) {
75 waiting_ = true; 75 waiting_ = true;
76 ui_test_utils::RunMessageLoop(); 76 content::RunMessageLoop();
77 waiting_ = false; 77 waiting_ = false;
78 } 78 }
79 return finished_; 79 return finished_;
80 } 80 }
81 81
82 void PPAPITestBase::TestFinishObserver::Observe( 82 void PPAPITestBase::TestFinishObserver::Observe(
83 int type, 83 int type,
84 const content::NotificationSource& source, 84 const content::NotificationSource& source,
85 const content::NotificationDetails& details) { 85 const content::NotificationDetails& details) {
86 DCHECK(type == content::NOTIFICATION_DOM_OPERATION_RESPONSE); 86 DCHECK(type == content::NOTIFICATION_DOM_OPERATION_RESPONSE);
(...skipping 283 matching lines...) Expand 10 before | Expand all | Expand 10 after
370 } 370 }
371 371
372 // Append the correct mode and testcase string 372 // Append the correct mode and testcase string
373 std::string PPAPINaClTestDisallowedSockets::BuildQuery( 373 std::string PPAPINaClTestDisallowedSockets::BuildQuery(
374 const std::string& base, 374 const std::string& base,
375 const std::string& test_case) { 375 const std::string& test_case) {
376 return StringPrintf("%smode=nacl_newlib&testcase=%s", base.c_str(), 376 return StringPrintf("%smode=nacl_newlib&testcase=%s", base.c_str(),
377 test_case.c_str()); 377 test_case.c_str());
378 } 378 }
379 379
OLDNEW
« no previous file with comments | « chrome/test/base/view_event_test_base.cc ('k') | content/browser/download/mhtml_generation_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698