OLD | NEW |
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 Loading... |
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 Loading... |
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 |
OLD | NEW |