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

Side by Side Diff: chrome/test/ui/ppapi_uitest.cc

Issue 10551002: TabContentsWrapper -> TabContents, part 56. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Not killing GetSelectedWebContents yet Created 8 years, 6 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
« no previous file with comments | « chrome/test/perf/rendering/throughput_tests.cc ('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) 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/ui/ppapi_uitest.h" 5 #include "chrome/test/ui/ppapi_uitest.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 214 matching lines...) Expand 10 before | Expand all | Expand 10 after
225 return test_name; 225 return test_name;
226 } 226 }
227 227
228 void PPAPITestBase::RunTestURL(const GURL& test_url) { 228 void PPAPITestBase::RunTestURL(const GURL& test_url) {
229 // See comment above TestingInstance in ppapi/test/testing_instance.h. 229 // See comment above TestingInstance in ppapi/test/testing_instance.h.
230 // Basically it sends messages using the DOM automation controller. The 230 // Basically it sends messages using the DOM automation controller. The
231 // value of "..." means it's still working and we should continue to wait, 231 // value of "..." means it's still working and we should continue to wait,
232 // any other value indicates completion (in this case it will start with 232 // any other value indicates completion (in this case it will start with
233 // "PASS" or "FAIL"). This keeps us from timing out on waits for long tests. 233 // "PASS" or "FAIL"). This keeps us from timing out on waits for long tests.
234 TestFinishObserver observer( 234 TestFinishObserver observer(
235 browser()->GetSelectedWebContents()->GetRenderViewHost(), kTimeoutMs); 235 browser()->GetActiveWebContents()->GetRenderViewHost(), kTimeoutMs);
236 236
237 ui_test_utils::NavigateToURL(browser(), test_url); 237 ui_test_utils::NavigateToURL(browser(), test_url);
238 238
239 ASSERT_TRUE(observer.WaitForFinish()) << "Test timed out."; 239 ASSERT_TRUE(observer.WaitForFinish()) << "Test timed out.";
240 240
241 EXPECT_STREQ("PASS", observer.result().c_str()); 241 EXPECT_STREQ("PASS", observer.result().c_str());
242 } 242 }
243 243
244 void PPAPITestBase::RunHTTPTestServer( 244 void PPAPITestBase::RunHTTPTestServer(
245 const FilePath& document_root, 245 const FilePath& document_root,
(...skipping 803 matching lines...) Expand 10 before | Expand all | Expand 10 after
1049 GURL url = GetTestFileUrl("View_CreatedInvisible"); 1049 GURL url = GetTestFileUrl("View_CreatedInvisible");
1050 browser::NavigateParams params(browser(), url, content::PAGE_TRANSITION_LINK); 1050 browser::NavigateParams params(browser(), url, content::PAGE_TRANSITION_LINK);
1051 params.disposition = NEW_BACKGROUND_TAB; 1051 params.disposition = NEW_BACKGROUND_TAB;
1052 ui_test_utils::NavigateToURL(&params); 1052 ui_test_utils::NavigateToURL(&params);
1053 } 1053 }
1054 1054
1055 // This test messes with tab visibility so is custom. 1055 // This test messes with tab visibility so is custom.
1056 IN_PROC_BROWSER_TEST_F(OutOfProcessPPAPITest, View_PageHideShow) { 1056 IN_PROC_BROWSER_TEST_F(OutOfProcessPPAPITest, View_PageHideShow) {
1057 // The plugin will be loaded in the foreground tab and will send us a message. 1057 // The plugin will be loaded in the foreground tab and will send us a message.
1058 TestFinishObserver observer( 1058 TestFinishObserver observer(
1059 browser()->GetSelectedWebContents()->GetRenderViewHost(), 1059 browser()->GetActiveWebContents()->GetRenderViewHost(),
1060 TestTimeouts::action_max_timeout_ms()); 1060 TestTimeouts::action_max_timeout_ms());
1061 1061
1062 GURL url = GetTestFileUrl("View_PageHideShow"); 1062 GURL url = GetTestFileUrl("View_PageHideShow");
1063 ui_test_utils::NavigateToURL(browser(), url); 1063 ui_test_utils::NavigateToURL(browser(), url);
1064 1064
1065 ASSERT_TRUE(observer.WaitForFinish()) << "Test timed out."; 1065 ASSERT_TRUE(observer.WaitForFinish()) << "Test timed out.";
1066 EXPECT_STREQ("TestPageHideShow:Created", observer.result().c_str()); 1066 EXPECT_STREQ("TestPageHideShow:Created", observer.result().c_str());
1067 observer.Reset(); 1067 observer.Reset();
1068 1068
1069 // Make a new tab to cause the original one to hide, this should trigger the 1069 // Make a new tab to cause the original one to hide, this should trigger the
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
1106 TEST_PPAPI_IN_PROCESS(FlashMessageLoop_Basics) 1106 TEST_PPAPI_IN_PROCESS(FlashMessageLoop_Basics)
1107 TEST_PPAPI_IN_PROCESS(FlashMessageLoop_RunWithoutQuit) 1107 TEST_PPAPI_IN_PROCESS(FlashMessageLoop_RunWithoutQuit)
1108 TEST_PPAPI_OUT_OF_PROCESS(FlashMessageLoop_Basics) 1108 TEST_PPAPI_OUT_OF_PROCESS(FlashMessageLoop_Basics)
1109 TEST_PPAPI_OUT_OF_PROCESS(FlashMessageLoop_RunWithoutQuit) 1109 TEST_PPAPI_OUT_OF_PROCESS(FlashMessageLoop_RunWithoutQuit)
1110 1110
1111 TEST_PPAPI_IN_PROCESS(MouseCursor) 1111 TEST_PPAPI_IN_PROCESS(MouseCursor)
1112 TEST_PPAPI_OUT_OF_PROCESS(MouseCursor) 1112 TEST_PPAPI_OUT_OF_PROCESS(MouseCursor)
1113 TEST_PPAPI_NACL_VIA_HTTP(MouseCursor) 1113 TEST_PPAPI_NACL_VIA_HTTP(MouseCursor)
1114 1114
1115 #endif // ADDRESS_SANITIZER 1115 #endif // ADDRESS_SANITIZER
OLDNEW
« no previous file with comments | « chrome/test/perf/rendering/throughput_tests.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698