OLD | NEW |
1 <!DOCTYPE html> | 1 <!DOCTYPE html> |
2 <!-- | 2 <!-- |
3 Copyright (c) 2014 The Chromium Authors. All rights reserved. | 3 Copyright (c) 2014 The Chromium Authors. All rights reserved. |
4 Use of this source code is governed by a BSD-style license that can be | 4 Use of this source code is governed by a BSD-style license that can be |
5 found in the LICENSE file. | 5 found in the LICENSE file. |
6 --> | 6 --> |
7 | 7 |
8 <link rel="import" href="/tracing/base/event.html"> | 8 <link rel="import" href="/tracing/base/event.html"> |
9 <link rel="import" href="/tracing/base/event_target.html"> | 9 <link rel="import" href="/tracing/base/event_target.html"> |
10 <link rel="import" href="/tracing/base/iteration_helpers.html"> | 10 <link rel="import" href="/tracing/base/iteration_helpers.html"> |
(...skipping 16 matching lines...) Expand all Loading... |
27 | 27 |
28 importEl.addEventListener('load', function() { | 28 importEl.addEventListener('load', function() { |
29 resolve({testRelpath: testRelpath, | 29 resolve({testRelpath: testRelpath, |
30 moduleName: moduleName}); | 30 moduleName: moduleName}); |
31 }); | 31 }); |
32 importEl.addEventListener('error', function(e) { | 32 importEl.addEventListener('error', function(e) { |
33 reject('Error loading <link rel="import" href="' + | 33 reject('Error loading <link rel="import" href="' + |
34 testRelpath + '"'); | 34 testRelpath + '"'); |
35 }); | 35 }); |
36 | 36 |
37 tr.doc.head.appendChild(importEl); | 37 Polymer.dom(tr.doc.head).appendChild(importEl); |
38 }); | 38 }); |
39 }, | 39 }, |
40 | 40 |
41 getCurrentlyExecutingModuleName: function() { | 41 getCurrentlyExecutingModuleName: function() { |
42 if (!document.currentScript) | 42 if (!document.currentScript) |
43 throw new Error('Cannot call testSuite except during load.'); | 43 throw new Error('Cannot call testSuite except during load.'); |
44 var linkDoc = document.currentScript.ownerDocument; | 44 var linkDoc = document.currentScript.ownerDocument; |
45 var url = linkDoc.URL; | 45 var url = linkDoc.URL; |
46 var name = this.guessModuleNameFromURL_(url); | 46 var name = this.guessModuleNameFromURL_(url); |
47 return name; | 47 return name; |
(...skipping 187 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
235 throw new Error('Test ' + fullyQualifiedName + | 235 throw new Error('Test ' + fullyQualifiedName + |
236 'not found amongst ' + this.testSuites.length); | 236 'not found amongst ' + this.testSuites.length); |
237 } | 237 } |
238 }; | 238 }; |
239 | 239 |
240 return { | 240 return { |
241 SuiteLoader: SuiteLoader | 241 SuiteLoader: SuiteLoader |
242 }; | 242 }; |
243 }); | 243 }); |
244 </script> | 244 </script> |
OLD | NEW |