content/test/unit/nodelist_data_2.xul
author Ted Mielczarek <ted.mielczarek@gmail.com>
Tue, 29 Sep 2009 08:31:50 -0400
changeset 33292 5642cd4a7e88fdc016fcd95248cc6109b60be1f8
parent 1 9b2a99adc05e53cd4010de512f50118594756650
permissions -rw-r--r--
bug 518641 - fix the "unify" script to properly handle Java .class files. r=bsmedberg Java .class files and Mach-O fat binaries use the same 4-byte magic number at the start of the file. 'unify' uses the magic number to detect Mach-O binaries, so it chokes on Java .class files. This change makes us use the same heuristic as file(1), which is to check the second 4 bytes in the file. Java class files put a version number there, and Mach-O fat binaries put the number of contained architectures there. Conveniently, Mach defines only 18 architectures, and Java's lowest shipping version number is 43, so there's no overlap in valid values.

<?xml version="1.0"?>
<!DOCTYPE window [
  <!ENTITY fooSet '
    <addOrRemove foo:foo="foo"/>
    <addOrRemove foo:foo="bar"/>
    <addOrRemove foo:bar="foo"/>
    <addOrRemove foo:bar="bar"/>
    <addOrRemove foo:foo="foo" foo:bar="bar"/>
    <addOrRemove foo2:foo="foo"/>
    <addOrRemove foo="foo"/>
    <addOrRemove foo="bar"/>
    <addOrRemove bar="bar" foo="foo"/>
'>
]>
<window
  xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
  xmlns:xul="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
  xmlns:foo="foo"
  xmlns:foo2="foo"
  xmlns:bar="bar"
  >
  <vbox id="boxes">
    <groupbox id="master1" foo:foo="bar">
      &fooSet;
      <groupbox foo:foo="foo">
        &fooSet;
      </groupbox>
    </groupbox>
    <groupbox id="master2" foo:foo="foo">
      &fooSet;
      <groupbox foo:foo="bar">
        &fooSet;
      </groupbox>
    </groupbox>
    <groupbox id="master3">
      &fooSet;
      <groupbox foo2:foo="foo">
        &fooSet;
      </groupbox>
    </groupbox>
    <groupbox id="external">
      &fooSet;
    </groupbox>
  </vbox>
</window>