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

Side by Side Diff: android_webview/javatests/src/org/chromium/android_webview/test/AwTestResourceProvider.java

Issue 11377117: Remove AppResource and unneeded resources. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase 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 | chrome/android/testshell/java/src/org/chromium/chrome/testshell/ChromiumTestShellActivity.java » ('j') | 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 package org.chromium.android_webview.test; 5 package org.chromium.android_webview.test;
6 6
7 import android.content.Context; 7 import android.content.Context;
8 8
9 import org.chromium.android_webview.AwResource; 9 import org.chromium.android_webview.AwResource;
10 import org.chromium.content.app.AppResource;
11 10
12 public class AwTestResourceProvider { 11 public class AwTestResourceProvider {
13 private static boolean sInitialized; 12 private static boolean sInitialized;
14 13
15 static void registerResources(Context context) { 14 static void registerResources(Context context) {
16 if (sInitialized) { 15 if (sInitialized) {
17 return; 16 return;
18 } 17 }
19 18
20 AppResource.DRAWABLE_ICON_ACTION_BAR_SHARE = R.drawable.resource_icon;
21 AppResource.DRAWABLE_ICON_ACTION_BAR_WEB_SEARCH = R.drawable.resource_ic on;
22
23 AppResource.STRING_ACTION_BAR_SHARE = R.string.test_string;
24 AppResource.STRING_ACTION_BAR_WEB_SEARCH = R.string.test_string;
25
26 AwResource.setResources(context.getResources()); 19 AwResource.setResources(context.getResources());
27 20
28 AwResource.RAW_LOAD_ERROR = R.raw.blank_html; 21 AwResource.RAW_LOAD_ERROR = R.raw.blank_html;
29 AwResource.RAW_NO_DOMAIN = R.raw.blank_html; 22 AwResource.RAW_NO_DOMAIN = R.raw.blank_html;
30 23
31 AwResource.STRING_DEFAULT_TEXT_ENCODING = R.string.test_string; 24 AwResource.STRING_DEFAULT_TEXT_ENCODING = R.string.test_string;
32 25
33 sInitialized = true; 26 sInitialized = true;
34 } 27 }
35 } 28 }
OLDNEW
« no previous file with comments | « no previous file | chrome/android/testshell/java/src/org/chromium/chrome/testshell/ChromiumTestShellActivity.java » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698