blob: c23691873740ec24b805986e7f84d70260cc2c37 [file] [log] [blame]
* Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file
* for details. All rights reserved. Use of this source code is governed by a
* BSD-style license that can be found in the LICENSE file.
* @description Tests how setting href attributes affects setting a new base for the URL.
import "dart:html";
import "../../../../Utils/expect.dart";
import "../../../testcommon.dart";
main() {
var base = document.createElement('base');
var a = document.createElement('a');
base.href = 'http://old_base/';
a.href = 'foo?query';
shouldBeEqualToString(a.href, 'http://old_base/foo?query');
base.href = 'http://new_base/';
shouldBeEqualToString(document.querySelector('a').href, 'http://new_base/foo?query');