diff options
Diffstat (limited to 'contexts/data/lib/closure-library/closure/goog/ui/media/mp3_test.html')
-rw-r--r-- | contexts/data/lib/closure-library/closure/goog/ui/media/mp3_test.html | 78 |
1 files changed, 0 insertions, 78 deletions
diff --git a/contexts/data/lib/closure-library/closure/goog/ui/media/mp3_test.html b/contexts/data/lib/closure-library/closure/goog/ui/media/mp3_test.html deleted file mode 100644 index f778002..0000000 --- a/contexts/data/lib/closure-library/closure/goog/ui/media/mp3_test.html +++ /dev/null @@ -1,78 +0,0 @@ -<!DOCTYPE html> -<html> -<!-- -Copyright 2009 The Closure Library Authors. All Rights Reserved. - -Use of this source code is governed by the Apache License, Version 2.0. -See the COPYING file for details. ---> -<!-- ---> -<head> -<meta http-equiv="X-UA-Compatible" content="IE=edge"> -<title>Closure Unit Tests - goog.ui.media.Mp3</title> -<script src="../../base.js"></script> -<script> - goog.require('goog.debug.Logger'); - goog.require('goog.dom'); - goog.require('goog.events'); - goog.require('goog.testing.LooseMock'); - goog.require('goog.testing.jsunit'); - goog.require('goog.ui.Component'); - goog.require('goog.ui.Control'); - goog.require('goog.ui.ControlRenderer'); - goog.require('goog.ui.media.FlashObject'); - goog.require('goog.ui.media.MediaModel'); - goog.require('goog.ui.media.MediaModel.Player'); - goog.require('goog.ui.media.Mp3'); -</script> -</head> -<body> -<script> - - var mp3; - var control; - var MP3_URL = 'http://www.shellworld.net/~davidsky/surf-oxy.mp3'; - var parent = goog.dom.createElement('div'); - - function setUp() { - mp3 = goog.ui.media.Mp3.getInstance(); - var flashUrl = goog.ui.media.Mp3.buildFlashUrl(MP3_URL); - var model = new goog.ui.media.MediaModel(MP3_URL, 'mp3 caption', ''); - model.setPlayer(new goog.ui.media.MediaModel.Player(flashUrl)); - control = new goog.ui.media.Media(model, mp3); - control.setSelected(true); - } - - function tearDown() { - control.dispose(); - } - - function testBasicRendering() { - control.render(parent); - var el = goog.dom.getElementsByTagNameAndClass( - 'div', goog.ui.media.Mp3.CSS_CLASS, parent); - assertEquals(1, el.length); - } - - function testParsingUrl() { - assertTrue(goog.ui.media.Mp3.MATCHER.test(MP3_URL)); - assertFalse( - goog.ui.media.Mp3.MATCHER.test('http://invalidUrl/filename.doc')); - } - - function testCreatingDomOnInitialState() { - control.render(parent); - var caption = goog.dom.getElementsByTagNameAndClass( - 'div', - goog.ui.media.Mp3.CSS_CLASS + '-caption', - parent); - assertEquals(1, caption.length); - - var flash = goog.dom.getElementsByTagNameAndClass( - undefined, goog.ui.media.FlashObject.CSS_CLASS, parent); - assertEquals(1, flash.length); - } -</script> -</body> -</html> |