| OLD | NEW |
| 1 // Copyright (c) 2011 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 // This file provides reliablity tests which run for ChromeFrame. | 5 // This file provides reliablity tests which run for ChromeFrame. |
| 6 // | 6 // |
| 7 // Usage: | 7 // Usage: |
| 8 // <reliability test exe> --list=file --startline=start --endline=end [...] | 8 // <reliability test exe> --list=file --startline=start --endline=end [...] |
| 9 // Upon invocation, it visits each of the URLs on line numbers between start | 9 // Upon invocation, it visits each of the URLs on line numbers between start |
| 10 // and end, inclusive, stored in the input file. The line number starts from 1. | 10 // and end, inclusive, stored in the input file. The line number starts from 1. |
| 11 // | 11 // |
| (...skipping 200 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 212 EXPECT_CALL(load_listener, OnDocumentComplete(StrCaseNe(L"about:blank"))) | 212 EXPECT_CALL(load_listener, OnDocumentComplete(StrCaseNe(L"about:blank"))) |
| 213 .WillOnce(QuitIE(&ie_event_sink)); | 213 .WillOnce(QuitIE(&ie_event_sink)); |
| 214 } | 214 } |
| 215 EXPECT_CALL(load_listener, OnQuit()).WillOnce(QUIT_LOOP(message_loop)); | 215 EXPECT_CALL(load_listener, OnQuit()).WillOnce(QUIT_LOOP(message_loop)); |
| 216 | 216 |
| 217 // Attach the sink and navigate. | 217 // Attach the sink and navigate. |
| 218 ie_event_sink.set_listener(&load_listener); | 218 ie_event_sink.set_listener(&load_listener); |
| 219 ie_event_sink.Attach(web_browser2); | 219 ie_event_sink.Attach(web_browser2); |
| 220 hr = ie_event_sink.Navigate(UTF8ToWide(url.spec())); | 220 hr = ie_event_sink.Navigate(UTF8ToWide(url.spec())); |
| 221 if (SUCCEEDED(hr)) { | 221 if (SUCCEEDED(hr)) { |
| 222 message_loop.RunFor(g_timeout_seconds); | 222 message_loop.RunFor(base::TimeDelta::FromSeconds(g_timeout_seconds)); |
| 223 if (!message_loop.WasTimedOut()) | 223 if (!message_loop.WasTimedOut()) |
| 224 metrics.result = NAVIGATION_SUCCESS; | 224 metrics.result = NAVIGATION_SUCCESS; |
| 225 } | 225 } |
| 226 | 226 |
| 227 // Log navigate complete time. | 227 // Log navigate complete time. |
| 228 time_now = base::Time::Now(); | 228 time_now = base::Time::Now(); |
| 229 test_log << "navigate_complete_seconds="; | 229 test_log << "navigate_complete_seconds="; |
| 230 test_log << (time_now.ToDoubleT() - time_start) << std::endl; | 230 test_log << (time_now.ToDoubleT() - time_start) << std::endl; |
| 231 | 231 |
| 232 // Close IE. | 232 // Close IE. |
| (...skipping 346 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 579 parsed_command_line.GetSwitchValuePath(switches::kJavaScriptFlags)); | 579 parsed_command_line.GetSwitchValuePath(switches::kJavaScriptFlags)); |
| 580 if (v8_command_line.HasSwitch(kV8LogFileSwitch)) { | 580 if (v8_command_line.HasSwitch(kV8LogFileSwitch)) { |
| 581 g_v8_log_path = v8_command_line.GetSwitchValuePath(kV8LogFileSwitch); | 581 g_v8_log_path = v8_command_line.GetSwitchValuePath(kV8LogFileSwitch); |
| 582 if (!file_util::AbsolutePath(&g_v8_log_path)) | 582 if (!file_util::AbsolutePath(&g_v8_log_path)) |
| 583 g_v8_log_path = FilePath(); | 583 g_v8_log_path = FilePath(); |
| 584 } | 584 } |
| 585 } | 585 } |
| 586 } | 586 } |
| 587 } | 587 } |
| 588 } | 588 } |
| OLD | NEW |