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