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

Unified Diff: tools/telemetry/telemetry/page/page_unittest.py

Issue 397793005: Add Page. TransferToPageSet (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Move TransferToPageSetAPI(..) to page Created 6 years, 5 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 | « tools/telemetry/telemetry/page/page_set_unittest.py ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/telemetry/telemetry/page/page_unittest.py
diff --git a/tools/telemetry/telemetry/page/page_unittest.py b/tools/telemetry/telemetry/page/page_unittest.py
index c60c59df5fb742be0d1fe8751b66d4c15951b04e..b392e55b457d90a402787dc4cfa3ef992fe6af59 100644
--- a/tools/telemetry/telemetry/page/page_unittest.py
+++ b/tools/telemetry/telemetry/page/page_unittest.py
@@ -137,3 +137,19 @@ class TestPage(unittest.TestCase):
'url': 'http://example.com/',
'name': 'Example'
}, named_dict)
+
+ def testTransferToPageSet(self):
+ page_set_a = page_set.PageSet()
+ page_set_b = page_set.PageSet()
+ page_foo = page.Page('http://foo.com', page_set_a)
+ page_bar = page.Page('http://bar.com', page_set_a)
+ page_baz = page.Page('http://baz.com', page_set_a)
+
+ page_set_a.AddPage(page_foo)
+ page_set_a.AddPage(page_bar)
+ page_set_a.AddPage(page_baz)
+
+ page_bar.TransferToPageSet(page_set_b)
+ self.assertEqual([page_foo, page_baz], page_set_a.pages)
+ self.assertEqual([page_bar], page_set_b.pages)
+ self.assertIs(page_set_b, page_bar.page_set)
« no previous file with comments | « tools/telemetry/telemetry/page/page_set_unittest.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698