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

Unified Diff: telemetry/telemetry/page/shared_page_state_unittest.py

Issue 2838073002: [shared_page_state] Fix unit test (Closed)
Patch Set: 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: telemetry/telemetry/page/shared_page_state_unittest.py
diff --git a/telemetry/telemetry/page/shared_page_state_unittest.py b/telemetry/telemetry/page/shared_page_state_unittest.py
index 7909f8f0919a2f941f14c7d197539ae57e894d4e..f82de45876bfb3db984f898d985907a6dad91027 100644
--- a/telemetry/telemetry/page/shared_page_state_unittest.py
+++ b/telemetry/telemetry/page/shared_page_state_unittest.py
@@ -4,6 +4,7 @@
import unittest
+from telemetry.core import platform as platform_module
from telemetry.internal import story_runner
from telemetry.page import page
from telemetry.page import legacy_page_test
@@ -82,8 +83,12 @@ class SharedPageStateTests(unittest.TestCase):
def testPageStatesUserAgentType(self):
self.assertUserAgentSetCorrectly(
shared_page_state.SharedMobilePageState, 'mobile')
+ if platform_module.GetHostPlatform().GetOSName() == 'chromeos':
nednguyen 2017/04/25 12:54:44 can you just change this flow to: if platform_modu
cywang 2017/04/25 13:14:18 Done.
+ device_type = 'chromeos'
+ else:
+ device_type = 'desktop'
self.assertUserAgentSetCorrectly(
- shared_page_state.SharedDesktopPageState, 'desktop')
+ shared_page_state.SharedDesktopPageState, device_type)
self.assertUserAgentSetCorrectly(
shared_page_state.SharedTabletPageState, 'tablet')
self.assertUserAgentSetCorrectly(
« 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