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