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

Side by Side Diff: chrome/android/junit/src/org/chromium/chrome/browser/webapps/WebApkUpdateManagerTest.java

Issue 2815103004: Android: convert kEnumName to ENUM_NAME in java_cpp_enum.py. (Closed)
Patch Set: Address agrieve@ comments Created 3 years, 8 months 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
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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.chrome.browser.webapps; 5 package org.chromium.chrome.browser.webapps;
6 6
7 import static org.junit.Assert.assertEquals; 7 import static org.junit.Assert.assertEquals;
8 import static org.junit.Assert.assertFalse; 8 import static org.junit.Assert.assertFalse;
9 import static org.junit.Assert.assertTrue; 9 import static org.junit.Assert.assertTrue;
10 10
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
54 54
55 /** Web Manifest URL */ 55 /** Web Manifest URL */
56 private static final String WEB_MANIFEST_URL = "manifest.json"; 56 private static final String WEB_MANIFEST_URL = "manifest.json";
57 57
58 private static final String START_URL = "/start_url.html"; 58 private static final String START_URL = "/start_url.html";
59 private static final String SCOPE_URL = "/"; 59 private static final String SCOPE_URL = "/";
60 private static final String NAME = "Long Name"; 60 private static final String NAME = "Long Name";
61 private static final String SHORT_NAME = "Short Name"; 61 private static final String SHORT_NAME = "Short Name";
62 private static final String ICON_URL = "/icon.png"; 62 private static final String ICON_URL = "/icon.png";
63 private static final String ICON_MURMUR2_HASH = "3"; 63 private static final String ICON_MURMUR2_HASH = "3";
64 private static final int DISPLAY_MODE = WebDisplayMode.kUndefined; 64 private static final int DISPLAY_MODE = WebDisplayMode.UNDEFINED;
65 private static final int ORIENTATION = ScreenOrientationValues.DEFAULT; 65 private static final int ORIENTATION = ScreenOrientationValues.DEFAULT;
66 private static final long THEME_COLOR = 1L; 66 private static final long THEME_COLOR = 1L;
67 private static final long BACKGROUND_COLOR = 2L; 67 private static final long BACKGROUND_COLOR = 2L;
68 68
69 /** Different name than the one used in {@link defaultManifestData()}. */ 69 /** Different name than the one used in {@link defaultManifestData()}. */
70 private static final String DIFFERENT_NAME = "Different Name"; 70 private static final String DIFFERENT_NAME = "Different Name";
71 71
72 /** {@link WebappDataStorage#Clock} subclass which enables time to be manual ly advanced. */ 72 /** {@link WebappDataStorage#Clock} subclass which enables time to be manual ly advanced. */
73 private static class MockClock extends WebappDataStorage.Clock { 73 private static class MockClock extends WebappDataStorage.Clock {
74 // 0 has a special meaning: {@link WebappDataStorage#LAST_USED_UNSET}. 74 // 0 has a special meaning: {@link WebappDataStorage#LAST_USED_UNSET}.
(...skipping 640 matching lines...) Expand 10 before | Expand all | Expand 10 after
715 // Since {@link WebApkActivity#OnStop()} calls {@link requestPendingUpda te()} to trigger an 715 // Since {@link WebApkActivity#OnStop()} calls {@link requestPendingUpda te()} to trigger an
716 // update request, we call it directly for testing. 716 // update request, we call it directly for testing.
717 updateManager.setIsWebApkForeground(false); 717 updateManager.setIsWebApkForeground(false);
718 updateManager.requestPendingUpdate(); 718 updateManager.requestPendingUpdate();
719 719
720 assertFalse(updateManager.getHasPendingUpdateForTesting()); 720 assertFalse(updateManager.getHasPendingUpdateForTesting());
721 assertTrue(updateManager.updateRequested()); 721 assertTrue(updateManager.updateRequested());
722 assertEquals(0, storage.getUpdateRequests()); 722 assertEquals(0, storage.getUpdateRequests());
723 } 723 }
724 } 724 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698