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

Side by Side Diff: chrome/test/plugin/plugin_test.cpp

Issue 113722: Make automation proxy objects to ref_counted. That allows to process async no... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 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/page_cycler/page_cycler_test.cc ('k') | chrome/test/reliability/page_load_test.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2008-2009, Google Inc. 1 // Copyright 2008-2009, Google Inc.
2 // All rights reserved. 2 // All rights reserved.
3 // 3 //
4 // Redistribution and use in source and binary forms, with or without 4 // Redistribution and use in source and binary forms, with or without
5 // modification, are permitted provided that the following conditions are 5 // modification, are permitted provided that the following conditions are
6 // met: 6 // met:
7 // 7 //
8 // * Redistributions of source code must retain the above copyright 8 // * Redistributions of source code must retain the above copyright
9 // notice, this list of conditions and the following disclaimer. 9 // notice, this list of conditions and the following disclaimer.
10 // * Redistributions in binary form must reproduce the above 10 // * Redistributions in binary form must reproduce the above
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after
109 path = path.Append(FilePath::FromWStringHack(test_case)); 109 path = path.Append(FilePath::FromWStringHack(test_case));
110 return net::FilePathToFileURL(path); 110 return net::FilePathToFileURL(path);
111 } 111 }
112 112
113 // Waits for the test case to finish. 113 // Waits for the test case to finish.
114 void WaitForFinish(const int wait_time) { 114 void WaitForFinish(const int wait_time) {
115 const int kSleepTime = 500; // 2 times per second 115 const int kSleepTime = 500; // 2 times per second
116 const int kMaxIntervals = wait_time / kSleepTime; 116 const int kMaxIntervals = wait_time / kSleepTime;
117 117
118 GURL url = GetTestUrl(L"done"); 118 GURL url = GetTestUrl(L"done");
119 scoped_ptr<TabProxy> tab(GetActiveTab()); 119 scoped_refptr<TabProxy> tab(GetActiveTab());
120 120
121 std::string done_str; 121 std::string done_str;
122 for (int i = 0; i < kMaxIntervals; ++i) { 122 for (int i = 0; i < kMaxIntervals; ++i) {
123 Sleep(kSleepTime); 123 Sleep(kSleepTime);
124 124
125 // The webpage being tested has javascript which sets a cookie 125 // The webpage being tested has javascript which sets a cookie
126 // which signals completion of the test. 126 // which signals completion of the test.
127 std::string cookieName = kTestCompleteCookie; 127 std::string cookieName = kTestCompleteCookie;
128 tab->GetCookieByName(url, cookieName, &done_str); 128 tab->GetCookieByName(url, cookieName, &done_str);
129 if (!done_str.empty()) 129 if (!done_str.empty())
(...skipping 182 matching lines...) Expand 10 before | Expand all | Expand 10 after
312 activex_codebase, 312 activex_codebase,
313 "http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab"); 313 "http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab");
314 314
315 EXPECT_EQ(activex_clsid, "{D27CDB6E-AE6D-11cf-96B8-444553540000}"); 315 EXPECT_EQ(activex_clsid, "{D27CDB6E-AE6D-11cf-96B8-444553540000}");
316 EXPECT_EQ(raw_activex_clsid, "D27CDB6E-AE6D-11cf-96B8-444553540000"); 316 EXPECT_EQ(raw_activex_clsid, "D27CDB6E-AE6D-11cf-96B8-444553540000");
317 317
318 EXPECT_EQ( 318 EXPECT_EQ(
319 activex_codebase, 319 activex_codebase,
320 "http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab"); 320 "http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab");
321 } 321 }
OLDNEW
« no previous file with comments | « chrome/test/page_cycler/page_cycler_test.cc ('k') | chrome/test/reliability/page_load_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698