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

Side by Side Diff: webkit/support/platform_support_android.cc

Issue 11416182: Allow WebKit performance tests to be available for Android devices (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years 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 | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 "webkit/support/platform_support.h" 5 #include "webkit/support/platform_support.h"
6 6
7 #include "base/android/jni_android.h" 7 #include "base/android/jni_android.h"
8 #include "base/file_path.h" 8 #include "base/file_path.h"
9 #include "base/file_util.h" 9 #include "base/file_util.h"
10 #include "base/logging.h" 10 #include "base/logging.h"
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
59 void AfterInitialize(bool unit_test_mode) { 59 void AfterInitialize(bool unit_test_mode) {
60 FilePath data_path(kDumpRenderTreeDir); 60 FilePath data_path(kDumpRenderTreeDir);
61 data_path = data_path.Append("DumpRenderTree.pak"); 61 data_path = data_path.Append("DumpRenderTree.pak");
62 ResourceBundle::InitSharedInstanceWithPakPath(data_path); 62 ResourceBundle::InitSharedInstanceWithPakPath(data_path);
63 63
64 if (unit_test_mode) 64 if (unit_test_mode)
65 return; 65 return;
66 66
67 // We enable file-over-http to bridge the file protocol to http protocol 67 // We enable file-over-http to bridge the file protocol to http protocol
68 // in here, which can 68 // in here, which can
69 // (1) run the layout tests on android target device, but never need to 69 // (1) run the layout and performance tests on android target device, but
70 // push the test files and corresponding resources to device, which saves 70 // never need to push the test files and corresponding resources to device,
71 // huge running time. 71 // which saves huge running time.
72 // (2) still run non-http layout (tests not under LayoutTests/http) tests 72 // (2) still run non-http layout (tests not under LayoutTests/http) tests
73 // via file protocol without breaking test environment / convention of webkit 73 // via file protocol without breaking test environment / convention of webkit
74 // layout tests, which are followed by current all webkit ports. 74 // layout tests, which are followed by current all webkit ports.
75 SimpleResourceLoaderBridge::AllowFileOverHTTP( 75 SimpleResourceLoaderBridge::AllowFileOverHTTP(
76 "third_party/WebKit/LayoutTests/", 76 "third_party/WebKit/LayoutTests/",
77 GURL("http://127.0.0.1:8000/all-tests/")); 77 GURL("http://127.0.0.1:8000/all-tests/"));
78 SimpleResourceLoaderBridge::AllowFileOverHTTP(
79 "third_party/WebKit/PerformanceTests/",
80 GURL("http://127.0.0.1:8000/all-perf-tests/"));
78 } 81 }
79 82
80 void BeforeShutdown() { 83 void BeforeShutdown() {
81 ResourceBundle::CleanupSharedInstance(); 84 ResourceBundle::CleanupSharedInstance();
82 } 85 }
83 86
84 void AfterShutdown() { 87 void AfterShutdown() {
85 } 88 }
86 89
87 } // namespace webkit_support 90 } // namespace webkit_support
(...skipping 26 matching lines...) Expand all
114 if (!success) 117 if (!success)
115 LOG(FATAL) << "Failed reading: " << path.value(); 118 LOG(FATAL) << "Failed reading: " << path.value();
116 } 119 }
117 return resize_corner_data; 120 return resize_corner_data;
118 } 121 }
119 } 122 }
120 123
121 return ResourceBundle::GetSharedInstance().GetRawDataResourceForScale( 124 return ResourceBundle::GetSharedInstance().GetRawDataResourceForScale(
122 resource_id, scale_factor); 125 resource_id, scale_factor);
123 } 126 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698