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

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

Issue 2838073002: [shared_page_state] Fix unit test (Closed)
Patch Set: [shared_page_state] Fix unit test testPageStatesUserAgentType 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..5696d291709ff23cd6b6302b9399da9f12921a13 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')
- self.assertUserAgentSetCorrectly(
- shared_page_state.SharedDesktopPageState, 'desktop')
+ if platform_module.GetHostPlatform().GetOSName() == 'chromeos':
+ self.assertUserAgentSetCorrectly(
+ shared_page_state.SharedDesktopPageState, 'chromeos')
+ else:
+ self.assertUserAgentSetCorrectly(
+ shared_page_state.SharedDesktopPageState, 'desktop')
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