<!DOCTYPE HTML>
<html>
<script src='test.js'></script>
<script src='is_option_element_toggleable.js'></script>
<script>

function testNonoptionElement() {
  try {
    isOptionElementTogglable(document.getElementById("s"));
    assert(false);
  } catch (error) {
    assert(error.message);
    assertEquals('element is not an option', error.message);
  }
}

function testOptionNotInSelect() {
  try {
    isOptionElementTogglable(document.getElementById("b"));
    assert(false);
  } catch (error) {
    assert(error.message);
    assertEquals('option element is not in a select', error.message);
  }
}

function testTogglable() {
  document.getElementById("s").multiple = 'multiple';
    assert(isOptionElementTogglable(document.getElementById("a")));
}

function testNotTogglable() {
  document.getElementById("s").multiple = '';
    assert(!isOptionElementTogglable(document.getElementById("a")));
}

</script>
<body>
  <select id="s">
    <option id="a">a</option>
  </select>
  <option id = "b">b</option>
</body>
</html>

<!DOCTYPE HTML>
<html>
<script src='test.js'></script>
<script src='is_option_element_toggleable.js'></script>
<script>

function testNonoptionElement() {
  try {
    isOptionElementToggleable(document.getElementById("s"));
    assert(false);
  } catch (error) {
    assert(error.message);
    assertEquals('element is not an option', error.message);
  }
}

function testOptionNotInSelect() {
  try {
    isOptionElementToggleable(document.getElementById("b"));
    assert(false);
  } catch (error) {
    assert(error.message);
    assertEquals('option element is not in a select', error.message);
  }
}

function testTogglable() {
  document.getElementById("s").multiple = 'multiple';
    assert(isOptionElementToggleable(document.getElementById("a")));
}

function testNotTogglable() {
  document.getElementById("s").multiple = '';
    assert(!isOptionElementToggleable(document.getElementById("a")));
}

</script>
<body>
  <select id="s">
    <option id="a">a</option>
  </select>
  <option id = "b">b</option>
</body>
</html>

Fix typo error in an html test page for a javascript. NOTRY=true
[chromedriver] Fix typo error in an html test page for a javascript.
NOTRY=true

Review URL: https://chromiumcodereview.appspot.com/13322009

git-svn-id: de016e52bd170d2d4f2344f9bf92d50478b649e0@192082 0039d316-1c4b-4281-b951-d872f2087c98
