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/browser/ui/webui/net_internals/net_internals_ui_browsertest.h" | 5 #include "chrome/browser/ui/webui/net_internals/net_internals_ui_browsertest.h" |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/bind_helpers.h" | 8 #include "base/bind_helpers.h" |
9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
10 #include "base/file_util.h" | 10 #include "base/file_util.h" |
(...skipping 362 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
373 //////////////////////////////////////////////////////////////////////////////// | 373 //////////////////////////////////////////////////////////////////////////////// |
374 | 374 |
375 NetInternalsTest::NetInternalsTest() | 375 NetInternalsTest::NetInternalsTest() |
376 : test_server_started_(false) { | 376 : test_server_started_(false) { |
377 message_handler_.reset(new MessageHandler(this)); | 377 message_handler_.reset(new MessageHandler(this)); |
378 } | 378 } |
379 | 379 |
380 NetInternalsTest::~NetInternalsTest() { | 380 NetInternalsTest::~NetInternalsTest() { |
381 } | 381 } |
382 | 382 |
383 void NetInternalsTest::SetUp() { | |
384 #if defined(OS_WIN) && defined(USE_AURA) | |
385 // The NetInternalsTest.netInternalsTimelineViewScrollbar test requires real | |
386 // GL bindings to pass on Win7 Aura. | |
387 UseRealGLBindings(); | |
388 #endif | |
389 | |
390 WebUIBrowserTest::SetUp(); | |
391 } | |
392 | |
393 void NetInternalsTest::SetUpCommandLine(CommandLine* command_line) { | 383 void NetInternalsTest::SetUpCommandLine(CommandLine* command_line) { |
394 WebUIBrowserTest::SetUpCommandLine(command_line); | 384 WebUIBrowserTest::SetUpCommandLine(command_line); |
395 // Needed to test the prerender view. | 385 // Needed to test the prerender view. |
396 command_line->AppendSwitchASCII(switches::kPrerenderMode, | 386 command_line->AppendSwitchASCII(switches::kPrerenderMode, |
397 switches::kPrerenderModeSwitchValueEnabled); | 387 switches::kPrerenderModeSwitchValueEnabled); |
398 } | 388 } |
399 | 389 |
400 void NetInternalsTest::SetUpOnMainThread() { | 390 void NetInternalsTest::SetUpOnMainThread() { |
401 WebUIBrowserTest::SetUpOnMainThread(); | 391 WebUIBrowserTest::SetUpOnMainThread(); |
402 // Increase the memory allowed in a prerendered page above normal settings, | 392 // Increase the memory allowed in a prerendered page above normal settings, |
(...skipping 24 matching lines...) Expand all Loading... |
427 GURL url_loader = test_server()->GetURL(replacement_path); | 417 GURL url_loader = test_server()->GetURL(replacement_path); |
428 return url_loader; | 418 return url_loader; |
429 } | 419 } |
430 | 420 |
431 bool NetInternalsTest::StartTestServer() { | 421 bool NetInternalsTest::StartTestServer() { |
432 if (test_server_started_) | 422 if (test_server_started_) |
433 return true; | 423 return true; |
434 test_server_started_ = test_server()->Start(); | 424 test_server_started_ = test_server()->Start(); |
435 return test_server_started_; | 425 return test_server_started_; |
436 } | 426 } |
OLD | NEW |