1<!DOCTYPE html> 2<!-- 3Copyright (c) 2015 The Chromium Authors. All rights reserved. 4Use of this source code is governed by a BSD-style license that can be 5found in the LICENSE file. 6--> 7 8<link rel="import" href="/tracing/model/source_info/source_info.html"> 9 10<script> 11'use strict'; 12 13tr.b.unittest.testSuite(function() { 14 test('domain', function() { 15 var urlDomains = { 16 'http://www.google.com': 'http://www.google.com', 17 'http://www.google.com/bla': 'http://www.google.com', 18 'http://www.google.com:1234': 'http://www.google.com', 19 'bad url': undefined 20 }; 21 for (var url in urlDomains) { 22 var sourceInfo = new tr.model.source_info.SourceInfo(url); 23 assert.equal(urlDomains[url], sourceInfo.domain); 24 } 25 }); 26}); 27</script> 28