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

Unified Diff: tools/android/loading/loading_trace_database_unittest.py

Issue 1969373002: tools/android/loading Move LoadingTraceDatabase under cloud/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@report
Patch Set: Rebase Created 4 years, 7 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/android/loading/loading_trace_database.py ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/android/loading/loading_trace_database_unittest.py
diff --git a/tools/android/loading/loading_trace_database_unittest.py b/tools/android/loading/loading_trace_database_unittest.py
deleted file mode 100644
index e64fb8cfc5dd01fd1d2b299c4601b0a18382909b..0000000000000000000000000000000000000000
--- a/tools/android/loading/loading_trace_database_unittest.py
+++ /dev/null
@@ -1,45 +0,0 @@
-# Copyright 2016 The Chromium Authors. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-import unittest
-
-from loading_trace_database import LoadingTraceDatabase
-
-
-class LoadingTraceDatabaseUnittest(unittest.TestCase):
- _JSON_DATABASE = {
- "traces/trace1.json" : { "url" : "http://bar.html", },
- "traces/trace2.json" : { "url" : "http://bar.html", },
- "traces/trace3.json" : { "url" : "http://qux.html", },
- }
-
- def setUp(self):
- self.database = LoadingTraceDatabase.FromJsonDict(self._JSON_DATABASE)
-
- def testGetTraceFilesForURL(self):
- # Test a URL with no matching traces.
- self.assertEqual(
- self.database.GetTraceFilesForURL("http://foo.html"),
- [])
-
- # Test a URL with matching traces.
- self.assertEqual(
- set(self.database.GetTraceFilesForURL("http://bar.html")),
- set(["traces/trace1.json", "traces/trace2.json"]))
-
- def testSerialization(self):
- self.assertEqual(
- self._JSON_DATABASE, self.database.ToJsonDict())
-
- def testSetTrace(self):
- dummy_url = "http://dummy.com"
- new_trace_file = "traces/new_trace.json"
- self.assertEqual(self.database.GetTraceFilesForURL(dummy_url), [])
- self.database.SetTrace(new_trace_file, {"url" : dummy_url})
- self.assertEqual(self.database.GetTraceFilesForURL(dummy_url),
- [new_trace_file])
-
-
-if __name__ == '__main__':
- unittest.main()
« no previous file with comments | « tools/android/loading/loading_trace_database.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698